import request from '@/utils/http'
import { BaseResult } from '@/types/axios'
import { DeptModelBo } from '@/api/system/deptApi/deptModel'

// 获取部门列表
export function getDeptList(): Promise<BaseResult> {
  return request.get({
    url: 'dept/list'
  })
}
// 新增部门
export function addDept(data: DeptModelBo): Promise<BaseResult> {
  return request.post({
    url: 'dept/create',
    data
  })
}
// 获取上级部门列表
export function getDeptOptions(): Promise<BaseResult> {
  return request.get({
    url: 'dept/getDeptOptions'
  })
}
